package proxy4jdbc3.solutions;

import proxy4jdbc3.JDBCReporter;
import proxy4jdbc3.jdbc.DriverProxy;

public class OracleDriverProxy extends DriverProxy {

	public OracleDriverProxy() {// must have a default constructor
	}

	static {// must register the driver in DriverManager at load time
		register(new OracleDriverProxy());
	}

	@Override
	public String getDriverClassName() {
		return "oracle.jdbc.driver.OracleDriver";
	}

	public JDBCReporter getReporter() {
		return new JDBCReporter() {
			public void reportUpdate(String sql) {
				System.out.println("Oracle Server updating... " + sql);
			}

			public void reportExecute(String sql) {
				System.out.println("Oracle Server Server executing... " + sql);
			}

			public void reportQuery(String sql) {
				System.out.println("Oracle Server querying... " + sql);
			}

		};
	}
}
